package edu.fanhuiling.blogsystem.model;

import edu.fanhuiling.blogsystem.utils.DateUtils;
import lombok.Data;

import java.util.Date;
@Data
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
//    判断当前登录用户是否是作者
    private boolean isLoginUser;
//    注意事项：当字段为is开头的boolean类型的get 和set方法 为=》
//    get: isLoginUser
//    set: setLoginUser


    public String getCreateTime(){
        return DateUtils.formatDate(createTime);
    }
}
